import axios from './index'
import { RegisterPayload, LoginPayload } from '@/typings/user'
export const validate = () => axios.get('/user/validate')

export function register<T>(values: RegisterPayload) {
    return axios.post<T, T>('/user/register', values);
}

export function login<T>(values: LoginPayload) {
    return axios.post<T, T>('/user/login', values);
}